extern int passcnt,movecnt,backtracks;
extern int bestQuality,bestLength;

struct st_pcard {
    int id;	/* Id of stack card removed card is on */
    int i;	/* Old index of removed card on stack */
    int btop;	/* Old bouquet top value for removals from a bouquet */
    char flip;	/* Nonzero if removing this card caused us to flip next card */
};

/* This is a variable sized data structure - we allocate it bigger with
 * extra entries in the c[] array if more than 1 card is in the "pair".
 * It is analogious to Move structure used in standard solvers */
typedef struct st_pair {
    int type;	/* MTYPE_STD, MTYPE_DEAL or MTYPE_REDEAL */
    int n;	/* Number of cards in "pair" */
    int score;	/* Score for this move. Lower is better. */
    struct st_pair *prev; /* Pointer to previous move, NULL if none */
    struct st_pair *next; /* Pointer to (next) alternate move */
    struct st_pcard c[1]; /* array of n cards to move */
} Pair;

typedef struct {
    int type;
    int id;	/* Id of stack card removed card is on */
    int i;	/* Old index of removed card on stack */
    int btop;	/* Old bouquet top value for removals from a bouquet */
    char flip;	/* Nonzero if removing this card caused us to flip next card */
} SavedPair;

extern SavedPair *bestSoln;
extern Stack *init_stacks;
extern Move *hist;
